import Vue from 'vue'
import App from './App.vue'

Vue.config.productionTip = false

Vue.filter("divide",function(data){
  data = data + ""

  // ?= n	匹配任何其后紧接指定字符串 n 的字符串。
//   return data.replace(/(\d)(?=(\d{3})+$)/g,
// "$1,")
// ---------
// let num = "12335465467573453"
// let reg = /(\d)(?=(\d{3})+$)/g 
// console.log(num.match(reg));
// -------
// return data.replace(/(\d)(?=(\d{3})+$)/g,"$1,")

return data.replace(/(\d)(?=(\d{3})+$)/g,"$1,")
})


new Vue({
  render: h => h(App),
}).$mount('#app')
